#ifndef FOOD_H
#define FOOD_H

#include <QWidget>
#include <QLabel>
class Food : public QLabel
{
    Q_OBJECT
public:
    explicit Food(int x,int y,int size,QWidget *parent = 0);
        
};

class Apple : public Food
{
public:
    Apple(int x,int y,int size,QWidget *parent = 0):Food(x,y,size,parent)
    {
        move(x*size,y*size);
        resize(size,size);
        setStyleSheet("border-image: url(:/image/body.png);");
        show();
    }
};

class Barrier : public Food
{
public:
    Barrier(int x,int y,int size,QWidget *parent = 0):Food(x,y,size,parent)
    {
        move(x*size,y*size);
        resize(size,size);
        setStyleSheet("border-image: url(:/image/apple.png);");
        show();
    }
};

class Star : public Food
{
public:
    Star(int x,int y,int size,QWidget *parent = 0):Food(x,y,size,parent)
    {
        move(x*size,y*size);
        resize(size,size);
        setStyleSheet("border-image: url(:/image/star.png);");
        show();
    }
};
class Fruit : public Food
{
public:
    Fruit(int x,int y,int size,QWidget *parent = 0):Food(x,y,size,parent)
    {
        move(x*size,y*size);
        resize(size,size);
        setStyleSheet("border-image: url(:/image/apple.png);");
        show();
    }
};
#endif // FOOD_H
